<?php
/* 
* [***********************]
* @author: mazhenyu[houdunwangmzy@163.com]
* @Date:   2014-06-25 14:43:07
* @Last Modified time: 2014-06-28 20:52:30
*/
class CommentModel extends Model{
	public $table = 'comment';

	/**
	 * [get_total 获得总数]
	 * @param  [type] $aid [description]
	 * @return [type]      [description]
	 */
	public function get_total($aid){
		return $this->where(array('article_aid'=>$aid))->count();
	}
	/**
	 * [get_data 获得数据]
	 * @param  [type] $aid [description]
	 * @return [type]      [description]
	 */
	public function get_data($aid){
		return $this->where(array('article_aid'=>$aid))->all();
	}

	public function add_data($commentData){
		//返回插入记录的主键id
		return $this->add($commentData);
	}


}
?>
